import request from '@/config/axios'

export interface ViolationInfoMgrVO {
  id: number
  vehicleNo: string
  driverName: string
  driverMobile: string
  waybillNo: string
  violationType: number
  violationTime: Date
  violationLocation: string
  violationDescription: string
  handleStatus: number
  handleResult: number
  remarks: string
}

// 查询违规信息管理列表
export const getViolationInfoMgrPage = async (params: ViolationInfoMgrPageReqVO) => {
  return await request.get({ url: `/queue/violation-info-mgr/page`, params })
}

// 查询违规信息管理详情
export const getViolationInfoMgr = async (id: number) => {
  return await request.get({ url: `/queue/violation-info-mgr/get?id=` + id })
}

// 新增违规信息管理
export const createViolationInfoMgr = async (data: ViolationInfoMgrVO) => {
  return await request.post({ url: `/queue/violation-info-mgr/create`, data })
}

// 修改违规信息管理
export const updateViolationInfoMgr = async (data: ViolationInfoMgrVO) => {
  return await request.put({ url: `/queue/violation-info-mgr/update`, data })
}

// 删除违规信息管理
export const deleteViolationInfoMgr = async (id: number) => {
  return await request.delete({ url: `/queue/violation-info-mgr/delete?id=` + id })
}

// 导出违规信息管理 Excel
export const exportViolationInfoMgr = async (params) => {
  return await request.download({ url: `/queue/violation-info-mgr/export-excel`, params })
}
